/* 设置页面样式 */

/* 选项卡导航 */
.settings-tabs {
    margin-top: 1.5rem;
}

.tab-nav {
    display: flex;
    border-bottom: 1px solid var(--border-color);
    margin-bottom: 1.5rem;
    overflow-x: auto;
}

.tab-button {
    background: none;
    border: none;
    padding: 1rem 1.5rem;
    color: var(--text-color-secondary);
    font-weight: 500;
    position: relative;
    cursor: pointer;
    white-space: nowrap;
}

.tab-button:hover {
    color: var(--primary-color);
}

.tab-button.active {
    color: var(--primary-color);
}

.tab-button.active::after {
    content: '';
    position: absolute;
    bottom: -1px;
    left: 0;
    right: 0;
    height: 2px;
    background-color: var(--primary-color);
}

/* 选项卡内容 */
.tab-content {
    display: none;
}

.tab-content.active {
    display: block;
}

/* 设置卡片 */
.settings-card {
    background-color: var(--card-bg);
    border-radius: 0.5rem;
    box-shadow: var(--card-shadow);
    padding: 1.5rem;
    margin-bottom: 1.5rem;
}

.settings-title {
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 1.5rem;
    color: var(--text-color);
}

/* 表单样式 */
.settings-form {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.form-group {
    display: flex;
    flex-direction: column;
}

.form-row {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
}

.form-row .form-group {
    flex: 1;
    min-width: 200px;
}

label {
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: var(--text-color);
}

.form-control {
    padding: 0.75rem;
    border: 1px solid var(--border-color);
    border-radius: 0.25rem;
    background-color: var(--input-bg);
    color: var(--text-color);
    width: 100%;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.form-control:focus {
    border-color: var(--primary-color);
    outline: none;
    box-shadow: 0 0 0 2px rgba(var(--primary-color-rgb), 0.25);
}

.form-control::placeholder {
    color: var(--text-color-tertiary);
}

.form-text {
    margin-top: 0.25rem;
    font-size: 0.875rem;
    color: var(--text-color-secondary);
}

/* 复选框样式 */
.checkbox-group {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.checkbox-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.checkbox-item input[type="checkbox"] {
    width: 1rem;
    height: 1rem;
}

.checkbox-item label {
    margin-bottom: 0;
    cursor: pointer;
}

/* 文件上传样式 */
.file-upload {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.file-preview {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem;
    border: 1px dashed var(--border-color);
    border-radius: 0.25rem;
    background-color: var(--bg-light);
}

.file-upload-btn {
    display: inline-block;
    padding: 0.5rem 1rem;
    background-color: var(--bg-light);
    border: 1px solid var(--border-color);
    border-radius: 0.25rem;
    color: var(--text-color);
    font-weight: 500;
    cursor: pointer;
    text-align: center;
    transition: background-color 0.2s;
}

.file-upload-btn:hover {
    background-color: var(--bg-hover);
}

/* 按钮样式 */
.form-actions {
    display: flex;
    justify-content: flex-start;
    gap: 1rem;
    margin-top: 1rem;
}

.btn {
    padding: 0.75rem 1.5rem;
    border-radius: 0.25rem;
    font-weight: 500;
    cursor: pointer;
    transition: background-color 0.2s, border-color 0.2s, color 0.2s;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    border: none;
}

.btn-sm {
    padding: 0.5rem 0.75rem;
    font-size: 0.875rem;
}

.btn-primary {
    background-color: var(--primary-color);
    color: white;
}

.btn-primary:hover {
    background-color: var(--primary-color-dark);
}

.btn-secondary {
    background-color: var(--bg-light);
    color: var(--text-color);
    border: 1px solid var(--border-color);
}

.btn-secondary:hover {
    background-color: var(--bg-hover);
}

.btn-danger {
    background-color: var(--danger-color);
    color: white;
}

.btn-danger:hover {
    background-color: var(--danger-color-dark);
}

.btn-outline {
    background-color: transparent;
    color: var(--primary-color);
    border: 1px solid var(--primary-color);
}

.btn-outline:hover {
    background-color: var(--primary-color-light);
}

/* 表格样式 */
.table-container {
    overflow-x: auto;
    margin-top: 1rem;
}

.data-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
}

.data-table th,
.data-table td {
    padding: 0.875rem 1rem;
    text-align: left;
    border-bottom: 1px solid var(--border-color);
}

.data-table th {
    font-weight: 600;
    color: var(--text-color);
    background-color: var(--bg-light);
    position: sticky;
    top: 0;
    z-index: 1;
}

.data-table tbody tr:hover {
    background-color: var(--bg-hover);
}

.placeholder-row td {
    text-align: center;
    color: var(--text-color-secondary);
    padding: 2rem 1rem;
}

/* 分页控件 */
.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 1rem;
    margin-top: 1.5rem;
}

.page-btn {
    padding: 0.5rem 1rem;
    background-color: var(--bg-light);
    border: 1px solid var(--border-color);
    border-radius: 0.25rem;
    cursor: pointer;
}

.page-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.page-info {
    color: var(--text-color-secondary);
    font-size: 0.875rem;
}

/* 角色和权限管理样式 */
.roles-container {
    display: grid;
    grid-template-columns: 1fr 2fr;
    gap: 1.5rem;
}

@media (max-width: 767px) {
    .roles-container {
        grid-template-columns: 1fr;
    }
}

.sidebar-like-list {
    list-style: none;
    padding: 0;
    margin: 0 0 1rem 0;
    border: 1px solid var(--border-color);
    border-radius: 0.25rem;
}

.sidebar-like-list li {
    padding: 0.75rem 1rem;
    border-bottom: 1px solid var(--border-color);
    cursor: pointer;
    transition: background-color 0.2s;
}

.sidebar-like-list li:last-child {
    border-bottom: none;
}

.sidebar-like-list li:hover {
    background-color: var(--bg-hover);
}

.sidebar-like-list li.active {
    background-color: var(--primary-color-light);
    font-weight: 500;
    color: var(--primary-color);
}

.role-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.role-actions {
    display: flex;
    gap: 0.5rem;
}

.permissions-list h4 {
    margin-bottom: 0.75rem;
    font-weight: 500;
}

/* 备份操作样式 */
.backup-actions {
    margin-bottom: 1.5rem;
}

/* 响应式调整 */
@media (max-width: 991px) {
    .form-row {
        flex-direction: column;
    }
} 